<style>
.k-grid td {
    white-space: nowrap;
    overflow: hidden;
}
 
.k-grid table {
    table-layout: fixed;
}

.k-edit-form-container
{
	text-align:center;
	width:100%;
}
</style>
<script type="text/javascript" src="/js/app/hyip1.js"></script>
<script type="text/javascript" src="/js/app/budget.js"></script>

<script>   
    var grid = null;
    var gridMonitor = null;
	var gridBudget = null;
	var windowPlan = null;
	
    $(document).ready(function() {
		$("#_status").kendoComboBox();        
        $("#_planType").kendoComboBox();
        $("#_profitType").kendoComboBox();
		
        grid = new Hyip.Grid("grid");		
	gridBudget = new Budget.Grid("gridBudget");
		
		$("#tabstrip").kendoTabStrip();
		
            $("#monitorDomain").kendoComboBox({
            index: 0,
            placeholder: "Select monitor",
            dataTextField: "domain",
            dataValueField: "id",
            filter: "contains",
            dataSource: {
                transport: {
                    read: {
                        url: "/hyip1/getMonitorValues",
                        dataType: "json"
                    }
                }
            }
        });
		
		windowPlan = $("#windowPlan");

        if (!windowPlan.data("kendoWindow")) {
            windowPlan.kendoWindow({
                width: 680,
                maxHeight: 500,
                title: "View",                
                close: function() {                    
                }
            });
        }
    });
    
    function btnSearchClick()
    {
        grid.refresh();
    } 
	
	function clearPaymentMethod()
    {
        $("[name='_paymentMethod']").prop('checked', false);
    }
	
	function showWindowPlan(id){
        var window = windowPlan.data("kendoWindow");                

        window.refresh({
            url: "/hyip1/view",
            data: { id: id }
        });
        
        windowPlan.data("kendoWindow").center();
        windowPlan.data("kendoWindow").open();
        
        $("#windowPlan").closest(".k-window").css({
            top: 50            
        });
        
         $("html, body").animate({ scrollTop: 0 }, "fast");

        return false;
    }
</script>

<script id="teamEditorTemplate" type="text/x-kendo-template">
<div style="width:720px;">
<dl>
	<dt ><label for="domain">Domain: </label></dt>
	<dd ><input type="text" class="k-textbox" name="domain" data-bind="value:domain"/></dd>
	<dt >Status: </dt>
	<dd >
		<select name="status" data-bind="value:status" data-role="dropdownlist">
			<option>New</option>
			<option>Paying</option>
			<option>Monitor</option>
			<option>Invest</option>
			<option>Invested</option>
			<option>Scam</option>
		</select>
	</dd>
	<dt >IP: </dt>
	<dd ><input type="text" class="k-textbox" name="ip" data-bind="value:ip" /></dd>
	<dt >Plan type: </dt>
	<dd > 
		<select name="planType" data-bind="value:planType" data-role="dropdownlist">
			<option>Very short</option>
			<option>Short</option>
			<option>Medium</option>
			<option>Long</option>
			<option>Very long</option>
		</select>
	</dd>
	<dt >Start date: </dt>
	<dd ><input id="startDate" name="startDate" data-bind="value:startDate" data-role="datepicker" data-format="dd/MM/yyyy" /></dd>
	<dt >End date: </dt>
	<dd ><input id="endDate" name="endDate" data-bind="value:endDate" data-role="datepicker" data-format="dd/MM/yyyy"/></dd>
	<dt >Start domain: </dt>
	<dd ><input id="startDomain" name="startDomain" data-bind="value:startDomain" data-role="datepicker" data-format="dd/MM/yyyy"/></dd>
	<dt >End domain: </dt>
	<dd ><input id="endDomain" name="endDomain" data-bind="value:endDomain" data-role="datepicker" data-format="dd/MM/yyyy"/></dd>
			<dt >Joined date: </dt>
	<dd ><input id="joinedDate" name="joinedDate" data-bind="value:joinedDate" data-role="datepicker" data-format="dd/MM/yyyy"/></dd>
	<dt >profit type: </dt>
	<dd >
		<select name="profitType" data-bind="value:profitType" data-role="dropdownlist">
			<option>Low</option>
			<option>Medium</option>
			<option>High</option>
			<option>Ultra</option>                            
		</select>
	</dd>			  	
        <dt>SSL type:</dt>
	<dd> 
            <select name="sslType" data-bind="value:sslType" data-role="dropdownlist">
                <option value="0">Not type</option>
                <option value="1">VeriSign.com</option>
                <option value="2">GlobalSign.com</option>
                <option value="3">Thawte.com</option>
                <option value="4">Digicert.com</option>
                <option value="5">GeoTrust.com</option>
                <option value="6">Rapidssl.com</option>
                <option value="7">Comodo.com</option>
                <option value="8">Godaddy.com</option>
                <option value="9">Cloudflare.com</option>
            </select></dd> 
        <dt>Plan time</dt>
	<dd style="text-align:left; padding-left:18px;"> 
            <input data-bind="value:planTime" data-role="numerictextbox" style="width:140px;"/> (days)
        </dd>  
	<dt>Payment :</dt>
	<dd id='paymentMethod' class="break">
		<input type="checkbox" id='isLibertyReverse'/><label for="isLibertyReverse" title="Liberty Reverse">LR</label>
		<input type="checkbox" id='isPerfectMoney' /><label for="isPerfectMoney" title="Perfect Money">PM</label>
		<input type="checkbox" id='isEgoPay'/> <label for="isEgoPay" title="EgoPay">EGO</label>
		<input type="checkbox" id='isSolidTrustPay'/> <label for="isSolidTrustPay" title="Solid Trust Pay">STP</label>
		<input type="checkbox" id='isBankWire'/><label for="isBankWire" title="BankWire">BW</label>
		<input type="checkbox" id='isPayza'/><label for="isPayza" title="Payza">PZ</label>
		<input type="checkbox" id='isWebMoney'/><label for="isWebMoney" title="WebMoney">WM</label>		
		<input type="checkbox" id='isInterKassa'/><label for="isInterKassa" title="InterKassa">IK</label>		
		<input type="checkbox" id='isAlfaBank'/><label for="isAlfaBank" title="Alfa Bank">AB</label>
		<input type="checkbox" id='isPaypal'/><label for="isPaypal" title="Paypal">PP</label>
		<input type="checkbox" id='isAlertPay'/><label for="isAlertPay" title="AlertPay">AP</label>
		<input type="checkbox" id='isTraceable'/><label for="isTraceable" title="Traceable Payment">TP</label>        
		<input type="checkbox" id='isCreditCard'/><label for="isCreditCard" title="Credit Card">CC</label>		
	</dd>        
        <dt>Feature:</dt>
	<dd id="feature" class="break">
            <input type="checkbox" id='isDDOS'/><label for="isDDOS">DDos</label>
            <input type="checkbox" id='isSSL'/><label for="isSSL">SSL</label>
            <input type="checkbox" id='isDedicatedServer' /><label for="isDedicatedServer">Dedicated Server</label>
            <input type="checkbox" id='isUniqueDesign'/><label for="isUniqueDesign">Unique Design</label>
            <input type="checkbox" id='isUniqueScript' /><label for="isUniqueScript">Unique Script</label>
            <input type="checkbox" id='isGCScript'/><label for="isGCScript">GC Script</label><br/>
            <input type="checkbox" id='isSupportOnline'/><label for="isSupportOnline">Support Online</label>
            <input type="checkbox" id='isPayInstant' /><label for="isPayInstant">Pay instant</label>
			<input type="checkbox" id='isPay7DaysAWeek' /><label for="isPay7DaysAWeek">Pay 7 days a week</label>
        </dd>	         
	<dt>Plan: </dt>	
	<dd>
		<textarea rows="10" cols="30" style="width:600px;height:300px" data-bind="value:plan" data-role="editor"></textarea>
	</dd>
</dl>
<div style="clear:both;"></div>
</div>  
</script>

<script id="budgetTemplate" type="text/x-kendo-template">
<div style="width:700px; text-align:left;">
<dl>
	<dt><label for="cost">Cost: </label></dt>
	<dd><input type="text" name="cost" data-bind="value:cost" style="width:150;"/></dd>
        <dt>Monitor:</dt>
	<dd><input type="text" id="ddlMonitor" name="monitorId"/></dd>
        <dt >Start date: </dt>
        <dd ><input id="startDate" name="startDate" data-bind="value:startDate" data-role="datepicker" data-format="dd/MM/yyyy" /></dd>	
	<dt >End date: </dt>
        <dd ><input id="endDate" name="endDate" data-bind="value:endDate" data-role="datepicker" data-format="dd/MM/yyyy"/></dd>	
 </dl>
    <div style="clear:both;"></div>
 <div style="padding-left:100px;">
 Description:<br/>
 <textarea rows="10" cols="30" style="width:500px;height:250px" data-bind="value:description" data-role="editor"></textarea>
 </div>
 </div>
</script>

<div id="tabstrip">
	<ul>
		<li class="k-state-active">
			Search
		</li>        
		<li>
			Budget
		</li> 		
	</ul>
	<div id="frmSearch" class="form" style="width:700px;">
		<dl>         
		    <dt class="first"><label for="_domain">Domain: </label></dt>
		    <dd class="first"><input type="text" class="k-textbox" id="_domain" /></dd>
		             
		    <dt class="second">Status: </dt>
		    <dd class="second">
		        <select id="_status">
					<option value="" selected="selected">All</option>
		            <option>New</option>
		            <option>Paying</option>
					<option>Monitor</option>
					<option>Invest</option>
					<option>Invested</option>
		            <option>Scam</option>
		        </select>
		    </dd>		    
		    <dt class="first">IP: </dt>
		    <dd class="first"><input type="text" class="k-textbox" id="_ip" /></dd>
                    <dt class="second">Plan type: </dt>
		    <dd class="second">
		        <select id="_planType">
					<option value="" selected="selected">All</option>
		            <option>Very short</option>
					<option>Short</option>
					<option>Medium</option>
		            <option>Long</option>
					<option>Very long</option>					
		        </select>
		    </dd>
			<dt class="first">Monitor: </dt>
                        <dd class="first"><input type="text" id="monitorDomain"/></dd>
			<dt class="second">Profit: </dt>
		    <dd class="second">
				<select id="_profitType">
					<option value="" selected="selected">All</option>
		            <option>Low</option>
					<option>Medium</option>
		            <option>High</option>
					<option>Ultra</option>					
		        </select>
			</dd>			
		</dl>
	    <div style="text-align:center;">
	        <button class="k-button long" onclick="btnSearchClick();">Search</button>
	    </div>
	</div>	
	<div style="width:1000;">
		<div id="gridBudget" style="width:1000; height:340;"></div>
	</div>
</div>
<div id="grid" style="height:600px;"></div>
<div id="windowPlan" style="display:none;"></div>
